package com.example.gomi.intelligentcitypipe.handler;

import com.example.gomi.intelligentcitypipe.serial.SerialController;

public class PushThraad implements Runnable {

    private static final long WAITTING_TIME = 3000L;

    private byte command;

    public PushThraad(byte command) {
        this.command = command;

    }

    @Override
    public void run() {
        try {
            Thread.sleep(WAITTING_TIME);
        } catch (InterruptedException e) {
            e.printStackTrace();
        } finally {
            SerialController.getInstance().push();
            synchronized (SerialController.threadBox) {
                SerialController.threadBox.clear();
            }
        }
    }

}
